
public class Dice {
	private int random1;
	private int random2;
	private int result;
	
	public Dice(int d1, int d2) {
		this.setRandom1(d1);
		this.setRandom2(d2);
	}
	
	public int roll(){
	//	this.setRandom1(1);    //when i'm checking position 
	//	this.setRandom2(1);
		this.setRandom1((int) (Math.random() * 6 + 1));
		this.setRandom2((int) (Math.random() * 6 + 1));
		
		this.setResult(this.getRandom1() + this.getRandom2());
		
		return this.getResult();
	}

	public void setRandom1(int random1) {
		this.random1 = random1;
	}

	public int getRandom1() {
		return random1;
	}

	public void setRandom2(int random2) {
		this.random2 = random2;
	}

	public int getRandom2() {
		return random2;
	}

	public void setResult(int result) {
		this.result = result;
	}

	public int getResult() {
		return result;
	}
}
